<div style="clear:both;"></div>
<div id="OrderForm" style="float:none; margin:0 auto; overflow:hidden;">
	<div class="Top">
		<div class="Bottom">
			<div class="Content">
				<div id="RegForm" class="NP">
					<p class="Title"><span style="font-size:13px; visibility:hidden;">*</span>Регистрация</p>
					<hr class="Line" />
					<!--<form action="/site/registration" name="reg" method="post" class="PForm">-->
					<?php
					$form = $this->beginWidget('CActiveForm', array(
								'id' => 'user-form',
								'action' => '/site/reg',
								'enableAjaxValidation' => true,
								'htmlOptions' => array(
									'enctype' => "multipart/form-data",
									'method' => 'post',)
							));
					?>
					<p>
						<span class="Red">*</span>Имя
					</p>
						<?php echo $form->errorSummary($reg); ?>
					<p>
						<span style="visibility:hidden;">*</span>
						<?php echo $form->textField($reg, 'username', array('class' => 'PText')); ?>
						<?php echo $form->error($reg, 'username'); ?>
					</p>
					<p>
						<span class="Red">*</span>Электронная почта
					</p>
					<p>
						<span style="visibility:hidden;">*</span>
						<?php echo $form->textField($reg, 'email', array('class' => 'PText')); ?>
						<?php echo $form->error($reg, 'email'); ?>
					</p>
					<table width="100%">
						<tr>
							<td>
								<span class="Red">*</span>Пароль
							</td>
							<td style="padding-left:10px;">
								Подтвердить
							</td>
						<tr>
							<td align="left">
								<span style="visibility:hidden;">*</span>
								<?php /* echo $form->passwordField($reg, 'password', array('class' => 'Pass')); */ ?>
								<input type="password" id="RegForm_password" class="Pass" onkeyup="ttt()" name="RegForm[password]" />
								<?php $form->error($reg, 'password'); ?>
							</td>
							<td style="padding-left:10px;" align="left">
								<?php /* echo $form->passwordField($reg, 'password2', array('class' => 'Pass'), array('onkeyup' => 'ttt()')); */ ?>
								<input type="password" id="RegForm_password2" class="Pass" onkeyup="ttt()" name="RegForm[password2]" />
								<?php $form->error($reg, 'password2') ?>
							</td>
						</tr>
					</table>
					<p style="margin-top:27px;">
						<input type="checkbox" onchange="qqq()" id="Checkbox" />
						<label style="margin-left:5px;">Принимаю </label>
						<a href="#" class="Green">пользовательское соглашение</a>
					</p>
					<div style="width:100%; height:51px;">
						<p class="Red" id="PassError" style="display:none;">Пароли не совпадают!</p>
					</div>
					<table>
						<tr>
							<td valign="top">
								<input type="submit" class="Reg" value=" " disabled="disabled" />
							</td>
							<!--<td valign="top">
								<input type="button" class="Cancel" onclick="$(document).trigger('close.facebox');"/>
			</td>!-->
						</tr>
					</table>
					<?php $this->endWidget(); ?>
				</div>
            </div>
        </div>
	</div>
</div>
<script type="text/javascript" >
	ttt = function(){
		var FP = $("#RegForm_password").value;
		var SP = $("#RegForm_password2").value;
		if(FP==SP){
			$("#PassError").hide();
			$(".Reg").removeAttr("disabled");
		}
		else
		{
			$("#PassError").show();
			$(".Reg").attr("disabled","disabled");
		}
	}

	qqq = function(){
		var qq = document.getElementById("Checkbox");
		//alert(qq.value);
		if(qq.value=="on"){
			$(".Reg").removeAttr("disabled");
			//alert("Yes");
		}
		else
		{
			$(".Reg").attr("disabled","disabled");
			//alert("No");
		}
	}
</script>








